<?php
$cats = $this->Category_model->getallCate ();

?>
			<?php
			$style = 'style="text-decoration:none;"'?>
<div class="floatLeft sec_1">
<div class="box">

<h1 style="margin-left: 10%;"><?php
echo lang ( 'template.pro_cate' )?></h1>

<ul>

<?php
foreach ( $cats as $ob ) {
	?>
		<?php
	$a = str_replace ( " ", "-", $ob ['category_name'] )?>		
            	<li><?php
	echo anchor ( 'product/allproduct/' . $a, $ob ['category_name'], $style )?>
            	

                	<div class="sub">
						<?php
	$catchild = $this->Category_model->getallCateChildren ( $ob ['id'] );
	?>
                    	<ul>
						<?php
	foreach ( $catchild as $obchild ) {
		?>
                        	<li>
                        	<?php
		echo $obchild ['category_name']?>
                        	<div class="sub">
                        	<?php
		$procatchild = $this->Product_model->getByChildCatId ( $obchild ['id'] );
		?>
                        		<ul>
                    		<?php
		
		foreach ( $procatchild as $pro ) 

		{
			$b = str_replace ( ' ', '-', $pro ['name'] );
			?>
                        			<li>
                        			
                        			<?php
			echo anchor ( 'product/product_detail/' . $b, $pro ['name'], $style );
			?></li>
     <?php
		}
		?>
                        		</ul>
		</div>
		</li>
                        

                        <?php
	}
	?>	
                        </ul>

	</div>

	</li>
                <?php
}
?>

            
			</ul>
</div>
<!-- END BOX -->



<div class="box"><a href="#" title=""><img
	src="<?php
	echo base_url ( 'assets/images/slide.png' )?>" width="42"
	height="43" /></a> <a href="#" title=""><img
	src="<?php
	echo base_url ( 'assets/images/slide-02.png' )?>"
	width="42" height="43" /></a> <a href="#" title=""><img
	src="<?php
	echo base_url ( 'assets/images/slide-03.png' )?>"
	width="42" height="43" /></a> <a href="#" title=""><img
	src="<?php
	echo base_url ( 'assets/images/slide-04.png' )?>"
	width="42" height="43" /></a></div>
<!--END BOX --></div>
